function UserView(controller, div) {

	this.user = null;

	this.render = function() {
		if(this.user == null) {
			$(div).html('');
		} else {
			$(div).html('<div id="userMenu"></div>');
			$(div).jqxDropDownButton({ width: 100, height: 20,
				dropDownHorizontalAlignment: 'right', autoOpen: true });
			$(div).jqxDropDownButton('setContent', this.user.name);
			var html = '<table class="table-layout"><tr><td><div id="userProfileBtn">Профиль</div></td><td><div id="signoutBtn">Выход</div></td></tr></table>';
			$('#userMenu').html(html);
			$("#userProfileBtn").jqxButton().on('click', function () {
				self.showProfile();
			});
			$("#signoutBtn").jqxButton().on('click', function () {
				controller.signout()
			});
		}
	};

	this.showProfile = function() {
		alert('this is profile of user ' + this.user.name);
	};
};